package cn.aitrox.ry.service.anno.bo.ultrasound.video;

import cn.aitrox.ry.service.anno.entity.AnnoLesionResultEntity;
import cn.aitrox.ry.service.config.dto.tool.result.struct.rectangle.RectangleStruct;
import cn.aitrox.ry.util.JSONUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class VideoAnnoInfoBo {

    private Integer alrId;

    private RectangleStruct rectangle;

    private Date lastUpdateTime;

    public VideoAnnoInfoBo(AnnoLesionResultEntity alr) {
        this.alrId = alr.getId();
        this.rectangle = JSONUtil.parseObject(alr.getResult(), RectangleStruct.class);
        this.lastUpdateTime = alr.getUpdateTime();
    }
}
